import { lazy } from "react";

const Login = lazy(() => import("../pages/Login/index"));
const Home = lazy(() => import("../pages/Home/index"));

// 点检
const SpotCheck = lazy(() => import("../pages/SpotCheck/index/index"));
const SpotCheckDetail = lazy(() => import("../pages/SpotCheck/detail/index"));
const SpotCheckRecord = lazy(() => import("../pages/SpotCheck/record/index"));

// 巡检
const Inspection = lazy(() => import("../pages/Inspection/index/index"));
const InspectionDetail = lazy(() => import("../pages/Inspection/detail/index"));
const InspectionRecord = lazy(() => import("../pages/Inspection/record/index"));

// 保养
const Maintenance = lazy(() => import("../pages/Maintenance/index/index"));
const MaintenanceDetail = lazy(() =>
    import("../pages/Maintenance/detail/index")
);
const MaintenanceRecord = lazy(() =>
    import("../pages/Maintenance/record/index")
);

// 任务大厅
const Hall = lazy(() => import("../pages/Hall/index/index"));
const HallDetail = lazy(() => import("../pages/Hall/detail/index"));

// 受理任务
const HandTasks = lazy(() => import("../pages/HandTasks/index/index"));
const HandTasksDetail = lazy(() => import("../pages/HandTasks/detail/index"));

// 设备维修
const Equipment = lazy(() => import("../pages/Equipment/index/index"));
const EquipmentAdd = lazy(() => import("../pages/Equipment/detail/add"));
const EquipmentDetail = lazy(() => import("../pages/Equipment/detail/index"));

const Approve = lazy(() => import("../pages/Equipment/index/approve"));

// 快捷领用
const QuickCollection = lazy(() =>
    import("../pages/QuickCollection/index/index")
);

// 备件归还
const Return = lazy(() => import("../pages/QuickReturn/index/index"));
const ReturnDetail = lazy(() => import("../pages/Return/detail/index"));

// 备件归还
const Warehousing = lazy(() => import("../pages/Warehousing/index/index"));
const WarehousingDetail = lazy(() =>
    import("../pages/Warehousing/detail/index")
);

// 通知
const Notice = lazy(() => import("../pages/Notice/index/index"));

// 快速入库
const QuickWarehousing = lazy(() =>
    import("../pages/QuickWarehousing/index/index")
);
const QuickSearch = lazy(() =>
    import("../pages/QuickWarehousing/index/search")
);

// 盘点
const Inventory = lazy(() => import("../pages/Inventory/index/index"));
const InventoryDetail = lazy(() => import("../pages/Inventory/detail/index"));

// 审核

let routes = [
    {
        path: "/",
        component: Login,
    },
    {
        path: "/login",
        component: Login,
    },
    {
        path: "/home",
        component: Home,
    },
    {
        path: "/spotCheck",
        component: SpotCheck,
    },
    {
        path: "/spotCheckDetail",
        component: SpotCheckDetail,
    },
    {
        path: "/spotCheckRecord",
        component: SpotCheckRecord,
    },
    {
        path: "/inspection",
        component: Inspection,
    },
    {
        path: "/inspectionDetail",
        component: InspectionDetail,
    },
    {
        path: "/inspectionRecord",
        component: InspectionRecord,
    },
    {
        path: "/maintenance",
        component: Maintenance,
    },
    {
        path: "/maintenanceDetail",
        component: MaintenanceDetail,
    },
    {
        path: "/maintenanceRecord",
        component: MaintenanceRecord,
    },
    {
        path: "/hall",
        component: Hall,
    },
    {
        path: "/hallDetail",
        component: HallDetail,
    },
    {
        path: "/handTasks",
        component: HandTasks,
    },
    {
        path: "/handTasksDetail",
        component: HandTasksDetail,
    },
    {
        path: "/equipment",
        component: Equipment,
    },
    {
        path: "/approve",
        component: Approve,
    },
    {
        path: "/equipmentAdd",
        component: EquipmentAdd,
    },
    {
        path: "/equipmentDetail",
        component: EquipmentDetail,
    },
    {
        path: "/quickCollection",
        component: QuickCollection,
    },
    {
        path: "/return",
        component: Return,
    },
    {
        path: "/returnDetail",
        component: ReturnDetail,
    },
    {
        path: "/notice",
        component: Notice,
    },
    {
        path: "/warehousing",
        component: Warehousing,
    },
    {
        path: "/warehousingDetail",
        component: WarehousingDetail,
    },
    {
        path: "/quickWarehousing",
        component: QuickWarehousing,
    },
    {
        path: "/quickSearch",
        component: QuickSearch,
    },
    {
        path: "/inventory",
        component: Inventory,
    },
    {
        path: "/inventoryDetail",
        component: InventoryDetail,
    },
    // 审核列表
    {
        path: "/approveList",
        component: lazy(() => import("../pages/Approve/index")),
    },
    // 设备维护计划
    {
        path: "/approveMaintenancePlan",
        component: lazy(() =>
            import("../pages/ApproveList/EquipmentMaintenancePlan/index")
        ),
    },
    // 设备点检记录
    {
        path: "/approveSpotCheckRecord",
        component: lazy(() =>
            import("../pages/ApproveList/EquipmentSpotCheckRecord/index")
        ),
    },
    // 设备保养记录
    {
        path: "/approveMaintenanceRecords",
        component: lazy(() =>
            import("../pages/ApproveList/EquipmentMaintenanceRecords/index")
        ),
    },
    // 设备巡检记录
    {
        path: "/approveInspectionRecord",
        component: lazy(() =>
            import("../pages/ApproveList/EquipmentInspectionRecord/index")
        ),
    },
    // 备件入库
    {
        path: "/approveSparePartsStorage",
        component: lazy(() =>
            import("../pages/ApproveList/SparePartsStorage/index")
        ),
    },
    // 备件领用
    {
        path: "/approveSparePartsRequisition",
        component: lazy(() =>
            import("../pages/ApproveList/SparePartsRequisition/index")
        ),
    },
    // 备件归还
    {
        path: "/approveReturnSpareParts",
        component: lazy(() =>
            import("../pages/ApproveList/ReturnSpareParts/index")
        ),
    },
    // 设备先期管理
    {
        path: "/approveEquipmentPreparation",
        component: lazy(() =>
            import("../pages/ApproveList/EquipmentPreparation/index")
        ),
    },

];

export default routes;
